<%@ page import="org.springframework.security.core.context.SecurityContextHolder" %>
<table class="footer">
    <tr>
        <td><a href="<spring:url value="/" htmlEscape="true" />"><fmt:message key="button.home"/></a></td>
        <%

            if (null != SecurityContextHolder.getContext()
            && null != SecurityContextHolder.getContext().getAuthentication()
            && SecurityContextHolder.getContext().getAuthentication().isAuthenticated()) {
                String userName = SecurityContextHolder.getContext().getAuthentication().getName();
        %>
        <td><a href="<spring:url value="/logout" htmlEscape="true" />"><fmt:message key="button.logout"/></a></td>
        <td><%--<a href="<spring:url value="/users/<%=userName%>" htmlEscape="true" />">--%><%=userName%><%--</a>--%></td>
        <%}%>

    </tr>
</table>

</div>
</body>

</html>
